import { DefaultLayout, ParentLayout } from '@/layout'
import type { Route } from '@/layout/components'

export default {
  path: '/river',
  name: 'Aiver',
  component: DefaultLayout,
  redirect: '/river/supplierManage',
  meta: {
    title: '星河系统',
    icon: 'menu-river',
    alwaysShow: true,
    sort: 21,
    roles: ['星河系统']
  },
  children: [
    {
      path: 'supplierManage',
      name: 'SupplierManage',
      component: ParentLayout,
      meta: { title: '服务商管理', roles: ['服务商管理'] },
      children: [
        {
          path: 'rvSupplierManage',
          name: 'RvSupplierManage',
          component: () => import('@/views/river/supplierManage/index'),
          meta: { title: '服务商审核', roles: ['服务商审核'] }
        },
        {
          path: 'preview',
          name: 'Preview',
          component: () => import('@/views/river/supplierManage/preview'),
          meta: { title: '预览', hidden: true }
        },
        {
          path: 'basicInformation',
          name: 'BasicInformation',
          component: () =>
            import('@/views/river/supplierManage/basicInformation/index'),
          meta: { title: '基本资料', roles: ['基本资料'] }
        },
        {
          path: 'basicDataCenter',
          name: 'BasicDataCenter',
          component: () =>
            import('@/views/river/supplierManage/dataCenter/index'),
          meta: { title: '数据中心', roles: ['数据中心'] }
        },
        {
          path: 'divisionManage',
          name: 'DivisionManage',
          component: () =>
            import('@/views/river/supplierManage/divisionManage/index'),
          meta: { title: '事业部管理', roles: ['事业部管理'] }
        },
        {
          path: 'headOfficeManage',
          name: 'HeadOfficeManage',
          component: () =>
            import('@/views/river/supplierManage/headOfficeManage/index'),
          meta: { title: '总部管理', roles: ['总部管理'] }
        },
        {
          path: 'basicInformationRecord',
          name: 'BasicInformationRecord',
          component: () =>
            import(
              '@/views/river/supplierManage/basicInformation/BasicInformationRecord'
            ),
          meta: { title: '基本资料操作记录', hidden: true }
        },
        {
          path: 'salesCompanyRecord',
          name: 'SalesCompanyRecord',
          component: () =>
            import(
              '@/views/river/supplierManage/salesCompany/salesCompanyRecord'
            ),
          meta: { title: '销售公司操作记录', hidden: true }
        },
        {
          path: 'rvSupplierManageRecord',
          name: 'RvSupplierManageRecord',
          component: () =>
            import('@/views/river/supplierManage/rvSupplierManageRecord'),
          meta: { title: '服务商审核操作记录', hidden: true }
        },
        {
          path: 'salesCompany',
          name: 'SalesCompany',
          component: () => import('@/views/river/supplierManage/salesCompany'),
          meta: { title: '销售公司', roles: ['销售公司'] }
        },
        {
          path: 'rvSupplierDetail',
          name: 'RvSupplierDetail',
          component: () => import('@/views/river/supplierManage/detail'),
          meta: { title: '供应商资料', hidden: true }
        },
        {
          path: 'editrvSupplierDetail',
          name: 'EditRvSupplierDetail',
          component: () => import('@/views/river/supplierManage/edit'),
          meta: { title: '服务商编辑', hidden: true }
        },
        {
          path: 'InformationDetail',
          name: 'InformationDetail',
          component: () =>
            import('@/views/river/supplierManage/basicInformation/detail'),
          meta: { title: '资料详情', hidden: true }
        },
        {
          path: 'editInformation',
          name: 'EditInformation',
          component: () =>
            import(
              '@/views/river/supplierManage/basicInformation/editInformation'
            ),
          meta: { title: '基本资料编辑', hidden: true }
        },
        {
          path: 'editInSalesCompany',
          name: 'EditInSalesCompany',
          component: () =>
            import(
              '@/views/river/supplierManage/salesCompany/editSalesCompany'
            ),
          meta: { title: '销售公司编辑', hidden: true }
        }
      ]
    },
    {
      path: 'financeManage',
      name: 'FinanceManage',
      component: ParentLayout,
      meta: { title: '财务管理', roles: ['财务管理'] },
      children: [
        {
          path: 'rvWithdrawVerify',
          name: 'RvWithdrawVerify',
          component: () => import('@/views/river/financeManage/withdrawVerify'),
          meta: {
            title: '提现结算审核',
            roles: ['提现结算审核']
          }
        },
        {
          path: 'importOrders',
          name: 'ImportOrders',
          component: () =>
            import('@/views/river/supplierManage/importOrders/index'),
          meta: { title: '导入线下订单', roles: ['导入线下订单'] }
        },
        {
          path: 'rvWithdrawHistory',
          name: 'RvWithdrawHistory',
          component: () =>
            import('@/views/river/financeManage/withdrawVerify/history'),
          meta: {
            title: '历史记录',
            hidden: true
          }
        },
        {
          path: 'rvFinanceBillDetail',
          name: 'RvFinanceBillDetail',
          component: () =>
            import('@/views/river/financeManage/withdrawVerify/detail'),
          meta: { title: '提现结算详情', hidden: true }
        },
        {
          path: 'rvUploadReceipt',
          name: 'RvUploadReceipt',
          component: () => import('@/views/river/financeManage/uploadReceipt'),
          meta: {
            title: '上传回单',
            roles: ['上传回单']
          }
        },
        {
          path: 'rvReceiptDetailList',
          name: 'RvReceiptDetailList',
          component: () => import('@/views/river/financeManage/receiptDetail'),
          meta: {
            title: '回单明细',
            roles: ['回单明细']
          }
        },
        {
          path: 'rvReceiptSubDetailList',
          name: 'RvReceiptSubDetailList',
          component: () =>
            import('@/views/river/financeManage/receiptDetail/subDetail'),
          meta: {
            title: '新增回单详情',
            hidden: true
          }
        }
      ]
    },
    {
      path: 'setting',
      name: 'Setting',
      component: ParentLayout,
      meta: { title: '设置', roles: ['星河设置'] },
      children: [
        {
          path: 'rvAddress',
          name: 'RvAddress',
          component: () => import('@/views/river/setting/address'),
          meta: {
            title: '发票收货信息',
            roles: ['发票收货信息']
          }
        },
        {
          path: 'serviceConfiguration',
          name: 'ServiceConfiguration',
          component: () => import('@/views/river/setting/configuration'),
          meta: {
            title: '服务商收益配置',
            roles: ['服务商收益配置']
          }
        },
        {
          path: 'configurationRecord',
          name: 'ConfigurationRecord',
          component: () =>
            import('@/views/river/setting/configuration/configurationRecord'),
          meta: { title: '收益配置操作记录', hidden: true }
        }
      ]
    }
  ]
} as Route
